#
# Null backend - Acts as a "bit bucket" backend
#

from twisted.python import log
from twisted.web.xmlrpc import Proxy
from twisted.internet import reactor
from twisted.internet.defer import succeed

from fgs.proxy.error import FgsProxyError
from fgs.proxy.backend.iface import IGameBackend

class BackendNull(IGameBackend):
    def __init__(self, config):
        import logging
        self._log = logging.getLogger('backend.null')
        self._log.info("Starting NULL backend connector")

    def register(self, game_server):
        return succeed(game_server)

    def unregister(self):
        return succeed(None)

backend_class = BackendNull
